﻿<UserControl x:Class="mal.balades.Map.Controls.VisitControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Command="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.SL4"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <HyperlinkButton NavigateUri="{Binding Url}">
            <Image Width="20" Height="20" Source="{Binding PlaceCategoryPicture}" >
                <ToolTipService.ToolTip>
                    <ToolTip>
                        <ToolTip.Template>
                            <ControlTemplate TargetType="ToolTip">
                                <Grid>
                                    <Border BorderBrush="#CC6600" BorderThickness="1" CornerRadius="5"
                                            Background="White"
                                            Padding="5">
                                        <ContentPresenter 
                                        Content="{TemplateBinding Content}"  
                                        HorizontalAlignment="Center" 
                                        VerticalAlignment="Center"/>
                                        <Border.Effect>
                                            <DropShadowEffect Opacity="0.5"></DropShadowEffect>
                                        </Border.Effect>
                                    </Border>
                                </Grid>
                            </ControlTemplate>
                        </ToolTip.Template>
                        <StackPanel Orientation="Horizontal" >
                            <Image Source="{Binding Picture}" Width="150" Margin="0 0 5 0" />
                            <StackPanel VerticalAlignment="Top">
                                <TextBlock Text="{Binding Title}" FontSize="14" FontWeight="Bold" Foreground="#CC6600" />
                                <TextBlock Text="{Binding SumUp}"  TextWrapping="Wrap" Width="290"/>
                            </StackPanel>
                        </StackPanel>
                    </ToolTip>
                </ToolTipService.ToolTip>

            </Image>
        </HyperlinkButton>
    </Grid>
</UserControl>
